import java.util.Scanner;

public class FibonacciSequence {
    public static int fib(int n) {
        if (n == 1 || n == 2) {
            return 1;
        }
        int i = 1;
        int j = 1;
        int sum = 0;
        for (int m = 3; m <= n; m++) {
            sum = i + j;
            i = j;
            j = sum;
        }
        return sum;
    }


    public static void main(String[] args) {
        Scanner scanner = new Scanner(System.in);
        int term = scanner.nextInt();
        int ret = fib(term);
        System.out.println(ret);
    }
}
